package com.library.ble;

import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.support.annotation.Nullable;

import java.util.LinkedList;

/**
 * Created by gongjianghua on 16/5/26.
 */

public abstract class BleService<T extends BleConsts>  extends Service {
    /**
     * 信道协议
     */
    public   T  gattConst;

    /**
     * 打开定位
     */
    public static final int TO_OPEN_GPS = 170778;
    /**
     * 打开蓝牙
     */
    public static final int TO_OPEN_BLE = 170214;

    /** 蓝牙操作的管理类*/
    public static BleDeviceManager bleManager=null;
    /**
     * 预备工作的工作队列
     */
    private LinkedList<String> worklist=new LinkedList();


    private ServiceBinder MBleService=new ServiceBinder();
    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return MBleService;
    }
    public class ServiceBinder extends Binder {
        public BleService getService() {
            return BleService.this;
        }
    }


}
